<%@ page import="java.util.*" %>
<%@ page import="com.vo.Usuarios;" %>
<jsp:useBean id="bean" class="com.bean.UsuarioBean" scope="session" />
 <%!
    String getUserType(Integer num){
	 String type="";
	 if(num==1){
		 type="Administrador";
	 }
	 if(num==2){
		 type="Diagramador";
	 }
	 if(num==3){
		 type="Chofer";
	 }
	 return type;
 	}
%>
<table cellspacing="0" cellpadding="0">
<thead>
<tr>
<th class="hidden"></th>
<th class="headTH">Nombre</th>
<th class="headTH">Tipo</th>
</tr>
</thead>
<tbody>
<%
Collection col=bean.getUsers();
Iterator it=col.iterator();
int i=0;
while(it.hasNext()){
	Usuarios u=(Usuarios)it.next();%>
<tr<%=((i%2==0)?" class=\"trOdd\"":"")%>>
<td class="hidden">
<input type="hidden" name="id" value="<%=u.getIdUsuario()%>" />
<input type="hidden" name="name" value="<%=u.getNombre()%>" />
<input type="hidden" name="type" value="<%=u.getIdTipoUsuario()%>" />
<!-- <input type="hidden" name="password" value="<%=u.getClave()%>" />   -->
</td>
<td><%=u.getNombre()%></td>
<td><%=getUserType(u.getIdTipoUsuario())%></td>
</tr>
<%
i++;
}%>
</tbody>
</table>